<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
 
    
    <title>My JSP 'list.jsp' starting page</title>
 
  </head>
  
  <body>
   		<center>
   			<h1>列表界面</h1>
   			<table>
   				<tr>
   					<td colspan="5">
   					<form action="${pageContext.request.contextPath}/users/getList.action" method="post">
   						username:<input type="text" name="username">
   						<input type="submit" value="查询 ">
   					</form>
   					</td>
   				</tr>
   				<tr>
   					<th>id</th>
   					<th>username</th>
   					<th>age</th>
   					<th>sex</th>
   					<th>birthday</th>
   					<th>操作</th>
   				</tr>
   				<c:forEach items="${list }" var="users">
   				<tr>
   					<td>${users.id }</td>
   					<td>${users.username}</td>
   					<td>${users.age}</td>
   					<td>${users.sex}</td>
   					<td><fmt:formatDate value="${users.birthday}" pattern="yyyy-MM-dd"/></td>
   					<th><a href="${pageContext.request.contextPath}/users/delete.action?id=${users.id }">删除</a>
   					<a href="${pageContext.request.contextPath}/users/updateUI.action?id=${users.id }">修改</a></th>
   				</tr>
   				</c:forEach>
   			</table>
   		</center>
  </body>
</html>
